package com.project.dao;

import com.project.bean.UserBean;

import java.sql.SQLException;
import java.time.LocalDate;
import java.util.List;

public interface IUserDao {
    public void add(UserBean userBean);

    public void delate(int id);

    public void update(int id, String password, String grade);

    public List<UserBean> findAll();

    public UserBean findById(int id ) throws SQLException;

    public List<UserBean>  findByName(String name);

    public List<UserBean> findByBirthday(LocalDate bir1,LocalDate bir2);

    public List<UserBean> findByGrade(String grade);

    public UserBean login(String name ,String password);

    /**
     * 动态条件查询用户
     * @param name 用户名
     * @param startDate 起始日期
     * @param endDate 结束日期
     * @return 用户集合
     */
    public List<UserBean> findByItem(String name,LocalDate startDate,LocalDate endDate);
}
